package com.mall.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mall.system.entity.SysLog;
import com.mall.system.mapper.SysLogMapper;
import com.mall.system.service.SysLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * 系统日志服务实现类
 */
@Slf4j
@Service
public class SysLogServiceImpl extends ServiceImpl<SysLogMapper, SysLog> implements SysLogService {
    
    @Override
    public boolean saveLog(SysLog sysLog) {
        try {
            return this.save(sysLog);
        } catch (Exception e) {
            log.error("保存系统日志到数据库异常: ", e);
            return false;
        }
    }
}